# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pyaes
_pkgname=pyaes
pkgver=1.6.1
pkgrel=4
pkgdesc='Pure-Python Implementation of the AES block-cipher and common modes of operation.'
arch=('any')
url='https://pypi.org/project/pyaes/#files'
depends=('python2')
makedepends=('python2-setuptools')
license=('MIT')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('00ce3babf72ea18b0de369860cd884058c7c6f3bd8b961c3ff591ef7d3dc0a69fabad5311f61c9f91d2f1a480c8512e34eeced5ec7145ed9f963bf91c5f8838a')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

